{% extends 'base.html' %}
{% block title %}
    <a class="navbar-brand" href="#"> 修改员工入职信息 </a>
{% endblock %}
{% block content %}
<div class="content">
	<div class="container-fluid">
		<div class="row">
			<div class="col-md-12">
				<div class="card">
					<form id="allInputsFormValidation" class="form-horizontal"  method="post" >
						<div class="content">
							<h4 class="title">基本信息</h4>

							<fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">
										姓名<span style="color:red">*</span>
									</label>
									<div class="col-sm-6">
										<input class="form-control" type="text" name="username" required="required" aria-required="true" autocomplete="off" value="{{ staff.username }}">
                                    </div>
								</div>
							</fieldset>

							<fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">
										部门名称<span style="color:red">*</span>
									</label>
									<div class="form-group">
										<div class="col-sm-6">
											<select class="form-control" name="departmentID" require>
												{% for department in departments %}
													{% if staff.departmentID == department.departmentID %}
														<option  value="{{ department.departmentID }}">{{ department.departmentname }}</option>
													{% endif %}
												{% endfor %}
												{% for department in departments %}
													{% if staff.departmentID != department.departmentID %}
														<option  value="{{ department.departmentID }}">{{ department.departmentname }}</option>
													{% endif %}
												{% endfor %}
											</select>
										</div>
									</div>
								</div>
							</fieldset>

							<fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">
										岗位名称<span style="color:red">*</span>
									</label>
									<div class="form-group">
										<div class="col-sm-6">
											<select class="form-control" name="postID" require>
												{% for post in posts %}
													{% if staff.postID == post.postID %}
														<option  value="{{ post.postID }}">{{ post.postname }}</option>
													{% endif %}
												{% endfor %}
												{% for post in posts %}
													{% if staff.postID != post.postID %}
													<option  value="{{ post.postID }}">{{ post.postname }}</option>
													{% endif %}
												{% endfor %}
											</select>
										</div>
									</div>
								</div>
							</fieldset>

							<fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">用工形式<span style="color:red">*</span></label>
									<div class="col-sm-10" style="margin-top: 10px">
									{% if staff.employment_form == '正式员工' %}
											<input type="radio" data-toggle="radio" name="employment_form" value="正式员工" checked="">正式员工

											<input type="radio" data-toggle="radio" name="employment_form" value="临时员工">临时员工
									{% endif %}
									{% if staff.employment_form == '临时员工' %}
											<input type="radio" data-toggle="radio" name="employment_form" value="正式员工" >正式员工

											<input type="radio" data-toggle="radio" name="employment_form" value="临时员工" checked="">临时员工
									{% endif %}
									</div>
								</div>
							</fieldset>


							<fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">
										手机号<span style="color:red">*</span>
									</label>
									<div class="col-sm-6">
										<input class="form-control" type="text" name="phone" value="{{ staff.phone }}" required="required" aria-required="true" oninput="value = value.replace(/[^\d|xX]/g,'')" maxlength="11" autocomplete="off">
									</div>
								</div>
							</fieldset>

							<fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">
										邮箱<span style="color:red">*</span>
									</label>
									<div class="col-sm-6">
										<input class="form-control" type="email" value="{{ staff.email }}" required="required" aria-required="true" name="email" email="true" autocomplete="off">
									</div>
								</div>
							</fieldset>

                            <fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">政治面貌</label>
									<div class="col-sm-10" style="margin-top: 10px">
                                        {% if staff.politics_status ==None  %}
											<input type="radio" data-toggle="radio" name="politics_status" value="党员" >党员
											<input type="radio" data-toggle="radio" name="politics_status" value="预备党员">预备党员
                                            <input type="radio" data-toggle="radio" name="politics_status" value="团员">团员
                                            <input type="radio" data-toggle="radio" name="politics_status" value="其他">其他
									    {% elif staff.politics_status =='党员' %}
                                            <input type="radio" data-toggle="radio" name="politics_status" value="党员" checked>党员
											<input type="radio" data-toggle="radio" name="politics_status" value="预备党员">预备党员
                                            <input type="radio" data-toggle="radio" name="politics_status" value="团员">团员
                                            <input type="radio" data-toggle="radio" name="politics_status" value="其他">其他
                                        {% elif staff.politics_status =='预备党员' %}
                                            <input type="radio" data-toggle="radio" name="politics_status" value="党员" >党员
											<input type="radio" data-toggle="radio" name="politics_status" value="预备党员"checked>预备党员
                                            <input type="radio" data-toggle="radio" name="politics_status" value="团员">团员
                                            <input type="radio" data-toggle="radio" name="politics_status" value="其他">其他
                                        {% elif staff.politics_status =='团员' %}
                                            <input type="radio" data-toggle="radio" name="politics_status" value="党员" >党员
											<input type="radio" data-toggle="radio" name="politics_status" value="预备党员">预备党员
                                            <input type="radio" data-toggle="radio" name="politics_status" value="团员"checked>团员
                                            <input type="radio" data-toggle="radio" name="politics_status" value="其他">其他
                                        {% elif staff.politics_status =='其他' %}
                                            <input type="radio" data-toggle="radio" name="politics_status" value="党员" >党员
											<input type="radio" data-toggle="radio" name="politics_status" value="预备党员">预备党员
                                            <input type="radio" data-toggle="radio" name="politics_status" value="团员">团员
                                            <input type="radio" data-toggle="radio" name="politics_status" value="其他" checked>其他
                                        {% endif %}
                                    </div>
								</div>
							</fieldset>

                            <fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">
										民族
									</label>
									<div class="form-group">
										<div class="col-sm-6">
											<select class="form-control" name="nation" require>
												{% for nation in nations %}
                                                    {% if staff.nation == nation.nation %}
													    <option  value="{{ nation.nation }}">{{ nation.nation }}</option>
                                                    {% endif %}
                                                {% endfor %}
                                                {% for nation in nations %}
                                                    {% if staff.nation != nation.nation %}
                                                        <option  value="{{ nation.nation }}">{{ nation.nation }}</option>
												    {% endif %}
                                                {% endfor %}
											</select>
										</div>
									</div>
								</div>
							</fieldset>

                            <fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">
										籍贯
									</label>
									<div class="col-sm-6">
										<input class="form-control" value="{{ staff.native_place }}" type="text" name="native_place"  aria-required="true" autocomplete="off">
									</div>
								</div>
							</fieldset>

                            <fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">
										身高
									</label>
									<div class="col-sm-6">
                                        {% if staff.height == None %}
										    <input class="form-control"  type="text" name="height"  oninput="value = value.replace(/[^\d|xX]/g,'')" maxlength="3" autocomplete="off">
                                        {% else %}
                                            <input class="form-control" value="{{ staff.height }}" type="text" name="height"  oninput="value = value.replace(/[^\d|xX]/g,'')" maxlength="3" autocomplete="off">
                                        {% endif %}
									</div>
								</div>
							</fieldset>

                            <fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">血型</label>
									<div class="col-sm-10" style="margin-top: 10px">
                                        {% if staff.bloodtype == None %}
											<input type="radio" data-toggle="radio" name="bloodtype" value="A型" >A型
											<input type="radio" data-toggle="radio" name="bloodtype" value="B型">B型
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="AB型">AB型
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="O型">O型
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="其他">其他
                                        {% elif staff.bloodtype == 'A型' %}
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="A型" checked>A型
											<input type="radio" data-toggle="radio" name="bloodtype" value="B型">B型
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="AB型">AB型
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="O型">O型
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="其他">其他
                                        {% elif staff.bloodtype == 'B型' %}
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="A型" >A型
											<input type="radio" data-toggle="radio" name="bloodtype" value="B型"checked>B型
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="AB型">AB型
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="O型">O型
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="其他">其他
                                        {% elif staff.bloodtype == 'AB型' %}
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="A型" >A型
											<input type="radio" data-toggle="radio" name="bloodtype" value="B型">B型
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="AB型"checked>AB型
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="O型">O型
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="其他">其他
                                        {% elif staff.bloodtype == 'O型' %}
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="A型" >A型
											<input type="radio" data-toggle="radio" name="bloodtype" value="B型">B型
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="AB型">AB型
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="O型"checked>O型
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="其他">其他
                                        {% elif staff.bloodtype == '其他' %}
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="A型" >A型
											<input type="radio" data-toggle="radio" name="bloodtype" value="B型">B型
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="AB型">AB型
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="O型">O型
                                            <input type="radio" data-toggle="radio" name="bloodtype" value="其他" checked>其他
                                        {% endif %}
									</div>
								</div>
							</fieldset>

                            <fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">婚姻</label>
									<div class="col-sm-10" style="margin-top: 10px">
                                        {% if staff.marriage == None %}
											<input type="radio" data-toggle="radio" name="marriage" value="未婚" >未婚
											<input type="radio" data-toggle="radio" name="marriage" value="已婚">已婚
                                            <input type="radio" data-toggle="radio" name="marriage" value="丧偶">丧偶
                                            <input type="radio" data-toggle="radio" name="marriage" value="离婚">离婚
                                            <input type="radio" data-toggle="radio" name="marriage" value="其他">其他
                                        {% elif staff.marriage == '未婚' %}
                                            <input type="radio" data-toggle="radio" name="marriage" value="未婚" checked>未婚
											<input type="radio" data-toggle="radio" name="marriage" value="已婚">已婚
                                            <input type="radio" data-toggle="radio" name="marriage" value="丧偶">丧偶
                                            <input type="radio" data-toggle="radio" name="marriage" value="离婚">离婚
                                            <input type="radio" data-toggle="radio" name="marriage" value="其他">其他
                                        {% elif staff.marriage == '已婚' %}
                                            <input type="radio" data-toggle="radio" name="marriage" value="未婚" >未婚
											<input type="radio" data-toggle="radio" name="marriage" value="已婚"checked>已婚
                                            <input type="radio" data-toggle="radio" name="marriage" value="丧偶">丧偶
                                            <input type="radio" data-toggle="radio" name="marriage" value="离婚">离婚
                                            <input type="radio" data-toggle="radio" name="marriage" value="其他">其他
                                        {% elif staff.marriage == '丧偶' %}
                                            <input type="radio" data-toggle="radio" name="marriage" value="未婚" >未婚
											<input type="radio" data-toggle="radio" name="marriage" value="已婚">已婚
                                            <input type="radio" data-toggle="radio" name="marriage" value="丧偶"checked>丧偶
                                            <input type="radio" data-toggle="radio" name="marriage" value="离婚">离婚
                                            <input type="radio" data-toggle="radio" name="marriage" value="其他">其他
                                        {% elif staff.marriage == '离婚' %}
                                            <input type="radio" data-toggle="radio" name="marriage" value="未婚" >未婚
											<input type="radio" data-toggle="radio" name="marriage" value="已婚">已婚
                                            <input type="radio" data-toggle="radio" name="marriage" value="丧偶">丧偶
                                            <input type="radio" data-toggle="radio" name="marriage" value="离婚"checked>离婚
                                            <input type="radio" data-toggle="radio" name="marriage" value="其他">其他
                                        {% elif staff.marriage == '其他' %}
                                            <input type="radio" data-toggle="radio" name="marriage" value="未婚" >未婚
											<input type="radio" data-toggle="radio" name="marriage" value="已婚">已婚
                                            <input type="radio" data-toggle="radio" name="marriage" value="丧偶">丧偶
                                            <input type="radio" data-toggle="radio" name="marriage" value="离婚">离婚
                                            <input type="radio" data-toggle="radio" name="marriage" value="其他"checked>其他
                                        {% endif %}
									</div>
								</div>
							</fieldset>

                            <fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">
										出生地
									</label>
									<div class="col-sm-6">
										<input class="form-control" value="{{ staff.birthplace }}" type="text" name="birthplace"  aria-required="true" autocomplete="off">
									</div>
								</div>
							</fieldset>

                            <fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">
										户口所在地
									</label>
									<div class="col-sm-6">
										<input class="form-control" value="{{ staff.domicileplace }}" type="text" name="domicileplace"  aria-required="true" autocomplete="off">
									</div>
								</div>
							</fieldset>

                            <fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">最高学历</label>
									<div class="col-sm-10" style="margin-top: 10px">
                                        {% if staff.highest_degree == None %}
											<input type="radio" data-toggle="radio" name="highest_degree" value="高中及以下" >高中及以下
											<input type="radio" data-toggle="radio" name="highest_degree" value="大专">大专
                                            <input type="radio" data-toggle="radio" name="highest_degree" value="本科">本科
                                            <input type="radio" data-toggle="radio" name="highest_degree" value="研究生">研究生
                                        {% elif staff.highest_degree == '高中及以下' %}
                                            <input type="radio" data-toggle="radio" name="highest_degree" value="高中及以下" checked>高中及以下
											<input type="radio" data-toggle="radio" name="highest_degree" value="大专">大专
                                            <input type="radio" data-toggle="radio" name="highest_degree" value="本科">本科
                                            <input type="radio" data-toggle="radio" name="highest_degree" value="研究生">研究生
                                        {% elif staff.highest_degree == '大专' %}
                                            <input type="radio" data-toggle="radio" name="highest_degree" value="高中及以下" >高中及以下
											<input type="radio" data-toggle="radio" name="highest_degree" value="大专"checked>大专
                                            <input type="radio" data-toggle="radio" name="highest_degree" value="本科">本科
                                            <input type="radio" data-toggle="radio" name="highest_degree" value="研究生">研究生
                                        {% elif staff.highest_degree == '本科' %}
                                            <input type="radio" data-toggle="radio" name="highest_degree" value="高中及以下" >高中及以下
											<input type="radio" data-toggle="radio" name="highest_degree" value="大专">大专
                                            <input type="radio" data-toggle="radio" name="highest_degree" value="本科"checked>本科
                                            <input type="radio" data-toggle="radio" name="highest_degree" value="研究生">研究生
                                        {% elif staff.highest_degree == '研究生' %}
                                            <input type="radio" data-toggle="radio" name="highest_degree" value="高中及以下" >高中及以下
											<input type="radio" data-toggle="radio" name="highest_degree" value="大专">大专
                                            <input type="radio" data-toggle="radio" name="highest_degree" value="本科">本科
                                            <input type="radio" data-toggle="radio" name="highest_degree" value="研究生"checked>研究生
                                        {% endif %}
									</div>
								</div>
							</fieldset>

                            <fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">最高学位</label>
									<div class="col-sm-10" style="margin-top: 10px">
                                        {% if staff.highest_offering == None %}
											<input type="radio" data-toggle="radio" name="highest_offering" value="无学位" >无学位
											<input type="radio" data-toggle="radio" name="highest_offering" value="学士">学士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="双学士">双学士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="硕士">硕士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="博士">博士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="博士后">博士后
                                        {% elif staff.highest_offering == '无学位' %}
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="无学位" checked>无学位
											<input type="radio" data-toggle="radio" name="highest_offering" value="学士">学士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="双学士">双学士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="硕士">硕士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="博士">博士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="博士后">博士后
                                        {% elif staff.highest_offering == '学士' %}
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="无学位" >无学位
											<input type="radio" data-toggle="radio" name="highest_offering" value="学士"checked>学士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="双学士">双学士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="硕士">硕士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="博士">博士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="博士后">博士后
                                        {% elif staff.highest_offering == '双学士' %}
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="无学位" >无学位
											<input type="radio" data-toggle="radio" name="highest_offering" value="学士">学士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="双学士"checked>双学士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="硕士">硕士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="博士">博士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="博士后">博士后
                                        {% elif staff.highest_offering == '硕士' %}
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="无学位" >无学位
											<input type="radio" data-toggle="radio" name="highest_offering" value="学士">学士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="双学士">双学士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="硕士"checked>硕士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="博士">博士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="博士后">博士后
                                        {% elif staff.highest_offering == '博士' %}
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="无学位" >无学位
											<input type="radio" data-toggle="radio" name="highest_offering" value="学士">学士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="双学士">双学士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="硕士">硕士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="博士"checked>博士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="博士后">博士后
                                        {% elif staff.highest_offering == '博士后' %}
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="无学位" >无学位
											<input type="radio" data-toggle="radio" name="highest_offering" value="学士">学士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="双学士">双学士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="硕士">硕士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="博士">博士
                                            <input type="radio" data-toggle="radio" name="highest_offering" value="博士后"checked>博士后
									    {% endif %}
                                    </div>
								</div>
							</fieldset>

                            <fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">
										毕业院校
									</label>
									<div class="col-sm-6">
										<input class="form-control"  value="{{ staff.graduate_school }}" type="text" name="graduate_school"  aria-required="true" autocomplete="off">
									</div>
								</div>
							</fieldset>

                            <fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">
										所学专业
									</label>
									<div class="col-sm-6">
										<input class="form-control" value="{{ staff.major }}" type="text" name="major"  aria-required="true" autocomplete="off">
									</div>
								</div>
							</fieldset>

                            <fieldset>
								<div class="form-group">
                                    <label class="col-sm-2 control-label">毕业日期</label>
                                    <div class="col-sm-6">

                                        <input type="date" name="graduation_date" value="{{ staff.graduation_date }}" class="form-control datepicker" autocomplete="off" >
                                    </div>
                                </div>
							</fieldset>



						</div>
						<div class="card-footer text-center">
							<input type="submit" name="submit" class="btn btn-info btn-fill" value="修改">
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
{% endblock %}